//
// Created by Jinyu Zhu on 2022/4/18.
//

#include "basic.h"

void ExeStop(const char *MsgCStr) {
    // construct full message
    char FullMsgCStr[1000];
    if (MsgCStr == nullptr) {
        sprintf(FullMsgCStr, "Execution stopped!");
    } else {
        sprintf(FullMsgCStr, "%s\nExecution stopped!", MsgCStr);
    }

    printf("%s", FullMsgCStr);
    exit(1);
}
